DADiSP Worksheet Functions > Function Categories > Generated Series > {} Array Construction
Creates a series or multiple column array.
{a, b, c}
{{a, b}, {c, d}}
|
- |
Any number of expressions resulting in an integer, real, complex, series, or string. |
A series or array.
a = {1, 2, 3}
Produces a single column, 3 element series
a = {0, a, 0}
returns the series {0, 1, 2, 3, 0}.
b = {{1, 2}, {3, 4}, {5, 6}}
Creates the 3x2 array
{{1, 2}
{3, 4}
{5, 6}}
c = {"a ", "string"}
creates the series {97, 32, 115, 116, 114, 105, 110, 103}
d = {1, 2i, 3}
creates the complex series {1+0i, 0+2i, 3+0i}
W1: gnorm(1000,1)
W2: {max(w1)};tablev
displays the maximum of W1 as a number in W2. W2 contains a single point series displayed as a table.
Assigning elements to the empty series, {}, removes values. For example:
a = ravel(1..9, 3);
a[.., 2] = {};
Removes the 2nd column and returns the array:
{{1, 7},
{2, 8},
{3, 9}}
The {} operator acts as a powerful CONCAT function by combining any number of any kind of data types to produce a single or multi-column array.